/* ************************************************************************



************************************************************************ */

qx.Class.define("HersPOS.SaleTableComp",
{
  //   extend : qx.ui.window.Composite,
  extend : qx.ui.container.Composite,

  events :
  {
    "reload"        : "qx.event.type.Event",
    "reload_selbox" : "qx.event.type.Event"
  },

  construct : function()
  {
    this.base(arguments);
    var layout = new qx.ui.layout.VBox();
    this.setLayout(layout);

    //   this.setLayout(new qx.ui.layout.Grid())
    this.setBackgroundColor("background-splitpane");

    this.setDecorator("main");
    this.setPadding(0);
    layout.setSeparator("separator-vertical");

    //   this.setWidth(Math.floor(qx.bom.Viewport.getWidth() * 0.12));
    this.SalesTable = new HersPOS.SalesTable();
    this.SalesBar = new HersPOS.SalesBar();

    this.add(this.SalesTable, { flex : 1 });
    this.add(this.SalesBar, { flex : 0 });

    this.SalesBar.addListener("reload", function()
    {
      this.SalesTable.reload_model();
      this.SalesTable.scrollCellVisible();
    },
    this);
  }
});

//     this.botPart.exclude()
